#ifndef GAME_H
#define GAME_H

#include <QObject>
#include <QDialog>
#include "keyboard.h"

class Keyboard;

class Game : public QObject
{
	Q_OBJECT
	int currentPlayer_;
	int numPlayers_;
	enum { ROW, COL, DIAG };
	QSize boardSize_;
	QVector<QVector<int> > V;  // V[row][col]
	void lineMatch( int type, int num );
public:
	explicit Game(QObject *parent = 0);
	int currentPlayer(){ return currentPlayer_; }
	QSize boardSize(){ return boardSize_; }

signals:
	void gameOver( int type, int num );

public slots:
	void checkStatus(Keyboard*);
};

#endif // GAME_H
